package com.hotel.controller;

import com.hotel.service.RoomService;
import com.hotel.utils.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

/**
 * @author YanMin
 * @version 1.0
 * @description:
 * @since 2022/8/20 10:14
 */
@RestController
@RequestMapping("/echarts")
public class echartsController {
    @Autowired
    private RoomService roomService;

    @RequestMapping("/pie")
    public ResultInfo pie() {
        return roomService.selectRoomState();
    }

    @RequestMapping("/pie2")
    public List<Map<String, Object>> pie2() {
        return roomService.selectRoomNumber();
    }
}
